index.tsx 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. import { GameListRep } from "@/api/home";
  2. import { userInfoApi } from "@/api/login";
  3. import { ChannelType, WithDrawParams, WithDrawType, getWithDrawApi } from "@/api/withdraw";
  4. import { clearWallet } from "@/app/[locale]/(navbar)/withdraw/actions";
  5. import TipsModal, { ModalProps } from "@/components/TipsModal";
  6. import { ChannelEnum, ChannelEnumMap } from "@/enums";
  7. import useGame from "@/hooks/useGame";
  8. import { useRouter } from "@/i18n/routing";
  9. import { useSystemStore } from "@/stores/useSystemStore";
  10. import { useUserInfoStore } from "@/stores/useUserInfoStore";
  11. import { useWalletStore } from "@/stores/useWalletStore";
  12. import { isEmail } from "@/utils";
  13. import { server } from "@/utils/client";
  14. import { percentage } from "@/utils/methods";
  15. import { Button, Form, Input, ProgressBar, Toast } from "antd-mobile";
  16. import BigNumber from "bignumber.js";
  17. import clsx from "clsx";
  18. import { useTranslations } from "next-intl";
  19. import React from "react";
  20. import { Swiper, SwiperSlide } from "swiper/react";
  21. import styles from "./index.module.scss";
  22. const getWithdrawApi = async () => {
  23. return server
  24. .request<WithDrawType[]>({
  25. url: "/v1/api/user/user_withdraw_config",
  26. method: "post",
  27. })
  28. .then((res) => {
  29. if (res.code === 200) {
  30. return res.data;
  31. }
  32. return [];
  33. });
  34. };
  35. const Withdraw = () => {
  36. const t = useTranslations();
  37. const router = useRouter();
  38. const { getGameUrl } = useGame();
  39. const [configData, setConfigData] = React.useState<WithDrawType[]>([] as WithDrawType[]);
  40. const [currentChannel, setCurrentChannel] = React.useState<WithDrawType>({} as WithDrawType);
  41. const [currentType, setCurrentType] = React.useState<ChannelType>({} as ChannelType);
  42. const [amount, setAmount] = React.useState<string>("");
  43. const { wallet } = useWalletStore();
  44. const isStrictMode = useSystemStore((state) => state.identity_verify.withdraw === 1);
  45. const userInfo = useUserInfoStore((state) => state.userInfo);
  46. // const canWithdrawRef = React.useRef<ModalProps>(null);
  47. const formInstanceRef = React.useRef<any>(null);
  48. const scoreRef = React.useRef<ModalProps>(null);
  49. const gameModelRef = React.useRef<ModalProps>(null);
  50. const game = React.useRef<GameListRep | null>(null);
  51. const successModelRef = React.useRef<ModalProps | null>(null);
  52. React.useEffect(() => {
  53. getData();
  54. }, []);
  55. React.useEffect(() => {
  56. formInstanceRef.current?.resetFields(["account_no"]);
  57. }, [currentType]);
  58. React.useEffect(() => {
  59. formInstanceRef.current?.resetFields();
  60. setAmount("");
  61. }, [currentChannel]);
  62. const quicks = React.useMemo(() => {
  63. return [200, 500, 1000, 10000];
  64. }, []);
  65. const faltaData = React.useMemo(() => {
  66. const {
  67. target_score_rollover,
  68. current_score_rollover,
  69. score,
  70. point,
  71. target_point_rollover,
  72. current_point_rollover,
  73. } = wallet;
  74. const total = target_score_rollover + target_point_rollover;
  75. const current = current_score_rollover + current_point_rollover;
  76. const waitScore = target_score_rollover - current_score_rollover;
  77. const waitPoint = target_point_rollover - current_point_rollover;
  78. let canWithdraw = true;
  79. if (waitScore !== 0 || waitPoint !== 0) {
  80. canWithdraw = false;
  81. }
  82. return {
  83. canWithdraw,
  84. percent: percentage(current, total),
  85. percentScore: (current_score_rollover / target_score_rollover) * 100,
  86. percentPoint: (current_point_rollover / target_point_rollover) * 100,
  87. waitScore,
  88. waitPoint,
  89. wait: waitScore + waitPoint,
  90. point,
  91. score: score || 0,
  92. };
  93. }, [wallet]);
  94. const getData = async () => {
  95. const res = await getWithdrawApi();
  96. if (res?.length > 0) {
  97. setConfigData(res);
  98. if (res[0]) {
  99. const cChannel = res[0];
  100. setCurrentChannel(cChannel);
  101. const ctype = cChannel?.channels;
  102. if (ctype && ctype?.length > 0) {
  103. setCurrentType(ctype[0] || {});
  104. }
  105. }
  106. }
  107. };
  108. const channelChangeHandler = (item: WithDrawType) => {
  109. setCurrentChannel(item);
  110. if (item?.channels && item?.channels?.length > 0) {
  111. setCurrentType(item.channels[0]);
  112. }
  113. };
  114. const valuesChange = (data: any) => {
  115. for (let key in data) {
  116. let curValue = data[key].trim();
  117. switch (key) {
  118. case "amount":
  119. {
  120. let max = currentChannel.max_amount;
  121. if (faltaData.score < currentChannel.max_amount) {
  122. max = faltaData.score;
  123. }
  124. const toValue = inputNumber(curValue, { max });
  125. setAmount(toValue);
  126. formInstanceRef.current?.setFieldValue(key, toValue);
  127. }
  128. break;
  129. case "account_no":
  130. {
  131. if (currentType.type === ChannelEnum.CPF) {
  132. const toValue = inputNumber(curValue, { length: 11 });
  133. formInstanceRef.current?.setFieldValue(key, toValue);
  134. }
  135. if (currentType.type === ChannelEnum.CNPJ) {
  136. const toValue = inputNumber(curValue, { length: 14 });
  137. formInstanceRef.current?.setFieldValue(key, toValue);
  138. }
  139. if (currentType.type === ChannelEnum.Phone) {
  140. const toValue = inputNumber(curValue, { length: 11 });
  141. formInstanceRef.current?.setFieldValue(key, toValue);
  142. }
  143. if (currentType.type === ChannelEnum.Email) {
  144. const toValue = curValue.replace(/\s/gi, "");
  145. formInstanceRef.current?.setFieldValue(key, toValue);
  146. }
  147. }
  148. break;
  149. case "passport":
  150. {
  151. const toValue = inputNumber(curValue, { length: 11 });
  152. formInstanceRef.current?.setFieldValue(key, toValue);
  153. }
  154. break;
  155. }
  156. }
  157. };
  158. const inputNumber = (
  159. value: string,
  160. opts?: {
  161. max?: number;
  162. length?: number;
  163. }
  164. ) => {
  165. const toValue = value.replace(/[^0-9]/, "");
  166. let toAmount = "";
  167. if (toValue) {
  168. toAmount = new BigNumber(toValue).toFixed(0, BigNumber.ROUND_DOWN);
  169. }
  170. if (opts?.max !== undefined && new BigNumber(toAmount).isGreaterThan(opts.max)) {
  171. toAmount = opts.max.toString();
  172. }
  173. if (opts?.length && toAmount.length > opts.length) {
  174. toAmount = toAmount.slice(0, opts.length);
  175. }
  176. return toAmount;
  177. };
  178. const ChannelValidator = (rules: any, value: string) => {
  179. if (!value) return Promise.reject(new Error(t("WithdrawPage.channel")));
  180. if (currentType.type === ChannelEnum.CPF) {
  181. return value.length !== 11
  182. ? Promise.reject(new Error(t("WithdrawPage.cpfReg")))
  183. : Promise.resolve();
  184. }
  185. if (currentType.type === ChannelEnum.CNPJ) {
  186. return value.length !== 14
  187. ? Promise.reject(new Error(t("WithdrawPage.cnpjReg")))
  188. : Promise.resolve();
  189. }
  190. if (currentType.type === ChannelEnum.Email) {
  191. return isEmail(value)
  192. ? Promise.resolve()
  193. : Promise.reject(new Error(t("WithdrawPage.EmailReg")));
  194. }
  195. if (currentType.type === ChannelEnum.Phone) {
  196. return value.length < 10
  197. ? Promise.reject(new Error(t("WithdrawPage.phoneReg")))
  198. : Promise.resolve();
  199. }
  200. return Promise.resolve();
  201. };
  202. const onFinish = async (value: any) => {
  203. const { data } = await userInfoApi();
  204. if (
  205. faltaData.score <= currentChannel.min_amount ||
  206. new BigNumber(value.amount).isGreaterThan(faltaData.score) ||
  207. faltaData.waitPoint !== 0 ||
  208. faltaData.waitScore !== 0
  209. ) {
  210. Toast.show("Quantidade insuficiente disponível para retirada");
  211. return;
  212. }
  213. // 如果有未完成游戏
  214. if (data.play_list && data.play_list.length > 0) {
  215. game.current = data.play_list[0];
  216. gameModelRef.current?.onOpen();
  217. return;
  218. }
  219. extractHandler();
  220. };
  221. const extractHandler = async () => {
  222. const values = formInstanceRef.current?.getFieldValues();
  223. const { passport, name, last_name, amount, account_no } = values;
  224. if (!amount) {
  225. return;
  226. }
  227. const params: WithDrawParams = {
  228. passport,
  229. channel_id: currentType.id,
  230. amount: Number(amount),
  231. account_no,
  232. user_name: `${name} ${last_name}`,
  233. };
  234. const withResult = await getWithDrawApi(params).catch((error) => {
  235. Toast.show(t(`code.${error.data.code}`));
  236. });
  237. if (withResult && withResult.code === 200) {
  238. Toast.show(t("code.200"));
  239. }
  240. await clearWallet();
  241. };
  242. // const goGame = () => {
  243. // const current = game.current;
  244. // getGameUrl(current!, { id: current?.id + "" });
  245. // };
  246. // const doCleanBonus = async () => {
  247. // try {
  248. // const res = await getUserTransferApi({ wallet_type: 2 });
  249. // if (res.code === 200) {
  250. // Toast.show(t("code.200"));
  251. // setTimeout(() => {
  252. // successModelRef.current?.onClose();
  253. // }, 1000);
  254. // }
  255. // } catch (error: any) {
  256. // Toast.show(t(`code.${error?.data?.code}`));
  257. // }
  258. // };
  259. return (
  260. <div className={styles.withdrawPage}>
  261. <div className={styles.swiperContainer}>
  262. <Swiper slidesPerView={3} spaceBetween={10} style={{ width: "100%" }}>
  263. {configData?.map((item, index) => (
  264. <SwiperSlide key={index}>
  265. <div
  266. className={clsx(
  267. styles.buttonItem,
  268. {
  269. [styles.active]: currentChannel?.id === item.id,
  270. },
  271. "iconfont"
  272. )}
  273. onClick={() => channelChangeHandler(item)}
  274. >
  275. <div className="text-center text-[.15rem]">
  276. {/* <img
  277. className="inline-block h-[.15rem]"
  278. src={item.icon}
  279. alt=""
  280. /> */}
  281. {item.name}
  282. </div>
  283. <div className="mt-[.02rem] text-[.13rem] text-[#11de68]">
  284. R${item.min_amount}~{item.max_amount}
  285. </div>
  286. </div>
  287. </SwiperSlide>
  288. ))}
  289. </Swiper>
  290. </div>
  291. <div className={styles.withdrawTitle}>
  292. <div className={styles.withdrawTitleText}>
  293. <span className="mr-[.1rem]">ContaSaldo</span>
  294. <span className="text-[#11de68]">
  295. R$ {faltaData.canWithdraw ? faltaData.score : 0}
  296. </span>
  297. </div>
  298. <i
  299. className="iconfont icon-22222_huaban1 text-[#eac61f]"
  300. onClick={() => {
  301. scoreRef.current?.onOpen();
  302. }}
  303. ></i>
  304. </div>
  305. {/* <div className="pb-[.1rem] text-[#74888f]">Valor do Saque</div> */}
  306. {/* <div className={styles.quick}>
  307. {quicks.map((item) => {
  308. return (
  309. <div
  310. className={clsx(
  311. styles.buttonItem,
  312. {
  313. [styles.active]: Number(amount) === item,
  314. },
  315. "iconfont flex h-[.44rem] flex-col items-center justify-center"
  316. )}
  317. key={item}
  318. onClick={() => {
  319. formInstanceRef.current?.setFieldValue("amount", item);
  320. setAmount(`${item}`);
  321. }}
  322. >
  323. <div className="text-[.16rem] text-[#11de68]">R$ {item}</div>
  324. </div>
  325. );
  326. })}
  327. </div> */}
  328. <div className="flex items-center py-[.1rem]">
  329. <i className="iconfont icon-22222_huaban1 mr-[.1rem] text-[#789098]"></i>
  330. <span className="text-[.12rem] text-[#eac61f]">
  331. A retirada minima após depositar R$ 10 é R$ 20
  332. </span>
  333. </div>
  334. <div>
  335. <Form ref={formInstanceRef} onFinish={onFinish} onValuesChange={valuesChange}>
  336. <Form.Item
  337. className={styles.amontForm}
  338. label={<div className="px-[.1rem]">R$</div>}
  339. layout="horizontal"
  340. extra={
  341. <div
  342. className={styles.todos}
  343. onClick={() => {
  344. let toValue = 0;
  345. if (faltaData.canWithdraw) {
  346. toValue = faltaData.score;
  347. }
  348. formInstanceRef.current?.setFieldValue("amount", `${toValue}`);
  349. setAmount(`${toValue}`);
  350. }}
  351. >
  352. Todos
  353. </div>
  354. }
  355. name="amount"
  356. >
  357. <Input
  358. className={styles.amountInput}
  359. onChange={(value) => setAmount(value)}
  360. placeholder={`${currentChannel.min_amount}~${currentChannel.max_amount}`}
  361. />
  362. </Form.Item>
  363. <div className={styles.line}></div>
  364. <div className={styles.channelText}>
  365. <span className="mr-[.1rem] text-[.14rem] text-[#768d95]">
  366. Método de Retirada
  367. </span>
  368. {currentChannel.icon && (
  369. <div className="rounded-[.04rem] border-[1px] border-[#16432f] px-[.06rem] py-[.02rem]">
  370. <img className="h-[.2rem]" src={currentChannel.icon} alt="" />
  371. </div>
  372. )}
  373. </div>
  374. <div>
  375. <Swiper slidesPerView={3} spaceBetween={10} style={{ width: "100%" }}>
  376. {currentChannel.channels?.map((item, index) => (
  377. <SwiperSlide key={index}>
  378. <div
  379. className={clsx(
  380. styles.buttonItem,
  381. {
  382. [styles.active]: currentType?.id === item.id,
  383. },
  384. "iconfont"
  385. )}
  386. onClick={() => setCurrentType(item)}
  387. >
  388. <div className="py-[.08rem] text-[.12rem]">
  389. {ChannelEnum[item.type]}
  390. </div>
  391. </div>
  392. </SwiperSlide>
  393. ))}
  394. </Swiper>
  395. </div>
  396. {(isStrictMode || currentType.type === ChannelEnum.CPF) && (
  397. <div className="mt-[.1rem] flex items-center">
  398. <Form.Item
  399. label="Nome"
  400. className="mr-[.1rem] w-[1.5rem] border-b-[1px] border-[#3b4852]"
  401. rules={[{ required: true }]}
  402. name="name"
  403. >
  404. <Input placeholder="Insira seu nome"></Input>
  405. </Form.Item>
  406. <Form.Item
  407. rules={[{ required: true }]}
  408. className="flex-1 border-b-[1px] border-[#3b4852]"
  409. label="Sobrenome"
  410. name="last_name"
  411. >
  412. <Input placeholder="Insira seu sobrenome"></Input>
  413. </Form.Item>
  414. </div>
  415. )}
  416. {isStrictMode && currentType.type !== ChannelEnum.CPF && (
  417. <Form.Item
  418. label={"CPF ID"}
  419. className="mt-[.1rem] border-b-[1px] border-[#3b4852]"
  420. name={"passport"}
  421. rules={[{ validator: ChannelValidator }]}
  422. >
  423. <Input
  424. className={clsx("flex-1")}
  425. placeholder={ChannelEnumMap.get(ChannelEnum.CPF)?.placeholder ?? ""}
  426. ></Input>
  427. </Form.Item>
  428. )}
  429. <Form.Item
  430. label={ChannelEnumMap.get(currentType.type)?.text}
  431. className="mt-[.1rem] border-b-[1px] border-[#3b4852]"
  432. name={"account_no"}
  433. rules={[{ validator: ChannelValidator }]}
  434. >
  435. <Input
  436. className={clsx("flex-1", {
  437. [styles.accountNo]: currentType.type === ChannelEnum.Phone,
  438. })}
  439. placeholder={ChannelEnumMap.get(currentType.type)?.placeholder ?? ""}
  440. ></Input>
  441. </Form.Item>
  442. </Form>
  443. <div className={styles.btns}>
  444. <Button
  445. className={styles.btn}
  446. onClick={() => formInstanceRef.current?.submit()}
  447. >
  448. Sacar
  449. </Button>
  450. <Button
  451. className={styles.btn}
  452. onClick={() => {
  453. router.push("/transactions?type=2");
  454. }}
  455. >
  456. Histórico
  457. </Button>
  458. </div>
  459. </div>
  460. {/* 可以提取弹窗 */}
  461. {/* <TipsModal
  462. title={
  463. <div className={"flex items-center text-[#11de68]"}>
  464. <i
  465. className={"iconfont icon-liwuhuodong mr-[0.0694rem] text-[0.2778rem]"}
  466. ></i>
  467. SACAR
  468. </div>
  469. }
  470. ref={canWithdrawRef}
  471. getContainer={document.querySelector("#app")}
  472. className={styles.ModalBox}
  473. >
  474. <ul>
  475. <li className={"mb-[0.0694rem]"}>
  476. <span className="mr-[.1rem]">{t("WithdrawPage.scoreTips")}</span>
  477. <span>
  478. <i className="mr-[.1rem]">R$</i>
  479. {wallet.score}
  480. </span>
  481. </li>
  482. <li>
  483. <div className={"flex items-center"}>
  484. <ProgressBar
  485. percent={faltaData.percentScore} //faltaData.percent
  486. className={"mr-[0.0694rem] flex-1"}
  487. style={{
  488. "--fill-color": "#11de68",
  489. "--track-color": "#8f9498",
  490. "--track-width": "0.0694rem",
  491. }}
  492. />
  493. <span>{faltaData.percentScore}%</span>
  494. </div>
  495. <div>
  496. <span className="mr-[.1rem]">FALTA APOSTAR</span>
  497. <span> R$ {faltaData.waitScore}</span>
  498. </div>
  499. </li>
  500. </ul>
  501. </TipsModal> */}
  502. {/*有彩金弹窗*/}
  503. <TipsModal
  504. title={
  505. <div className={"flex items-center text-[#11de68]"}>
  506. <i
  507. className={"iconfont icon-liwuhuodong mr-[0.0694rem] text-[0.2778rem]"}
  508. ></i>
  509. SACAR
  510. </div>
  511. }
  512. ref={scoreRef}
  513. getContainer={document.querySelector("#app")}
  514. className={styles.ModalBox}
  515. >
  516. <ul>
  517. <li className={"mb-[0.0694rem]"}>
  518. <span className="mr-[.1rem] inline-block w-[.6rem]">Conta Saldo</span>
  519. <span>
  520. <i className="mr-[.1rem] font-bold">R$</i>
  521. {faltaData.canWithdraw ? faltaData.score : 0}
  522. </span>
  523. </li>
  524. <li className={"mb-[0.0694rem]"}>
  525. <span className="mr-[.1rem] inline-block w-[.6rem]">
  526. {t("WithdrawPage.scoreTips")}
  527. </span>
  528. <span>
  529. <i className="mr-[.1rem] font-bold">R$</i>
  530. {wallet.score}
  531. </span>
  532. </li>
  533. <li className={"mb-[0.0694rem]"}>
  534. <span className="mr-[.1rem] inline-block w-[.6rem]">
  535. {t("WithdrawPage.pointTips")}
  536. </span>
  537. <span>
  538. <i className="mr-[.1rem] font-bold">R$</i>
  539. {wallet.point}
  540. </span>
  541. </li>
  542. <li>
  543. <div className={"flex items-center pt-[.1rem]"}>
  544. <ProgressBar
  545. percent={faltaData.percent} //faltaData.percent
  546. className={"mr-[0.0694rem] flex-1"}
  547. style={{
  548. "--fill-color": "#11de68",
  549. "--track-color": "#8f9498",
  550. "--track-width": "0.0694rem",
  551. }}
  552. />
  553. <span>{faltaData.percent}%</span>
  554. </div>
  555. </li>
  556. <div>
  557. <span className="mr-[.05rem]">FALTA APOSTAR</span>
  558. <span>
  559. <i className="mr-[.05rem] font-bold">R$</i>
  560. {faltaData.wait}
  561. </span>
  562. </div>
  563. <div className="mt-[.2rem] flex items-center justify-center">
  564. {!faltaData.canWithdraw && (
  565. <Button
  566. color={"primary"}
  567. className={"mx-auto flex-1 rounded-[.2rem_!important] font-bold"}
  568. style={{
  569. "--background-color": "#11de68",
  570. "--border-color": "#11de68",
  571. "--text-color": "#12171a",
  572. }}
  573. onClick={() => router.push("/")}
  574. >
  575. Comece o jogo
  576. </Button>
  577. )}
  578. {faltaData.canWithdraw && (
  579. <Button
  580. color={"primary"}
  581. className={"ml-[30px] flex-1 rounded-[.2rem_!important] font-bold"}
  582. style={{
  583. "--background-color": "#11de68",
  584. "--border-color": "#11de68",
  585. "--text-color": "#12171a",
  586. }}
  587. onClick={() => {
  588. scoreRef.current?.onClose();
  589. // extractHandler();
  590. }}
  591. >
  592. Bônus de retirada
  593. </Button>
  594. )}
  595. </div>
  596. </ul>
  597. </TipsModal>
  598. {/* 提现拦截 */}
  599. {/* <TipsModal
  600. title={
  601. <div className="text-left">
  602. <div className="text-[.12rem] text-[#fff]">
  603. Atualmente, existem jogos de bônus
  604. </div>
  605. <div className="text-[.12rem] text-[#ebc71f]">
  606. inacabados que não podem iniciar saques.
  607. </div>
  608. </div>
  609. }
  610. ref={gameModelRef}
  611. getContainer={document.querySelector("#app")}
  612. className={styles.gameModal}
  613. >
  614. <div className="pt-[.2rem]">
  615. <span>Bônus</span>
  616. <i className="mx-[.1rem]">R$</i>
  617. <span>{faltaData.point}</span>
  618. </div>
  619. <div className={"flex items-center"}>
  620. <ProgressBar
  621. percent={faltaData.percentPoint}
  622. className={"mr-[0.0694rem] flex-1"}
  623. style={{
  624. "--fill-color": "#11de68",
  625. "--track-color": "#8f9498",
  626. "--track-width": "0.0694rem",
  627. }}
  628. />
  629. <span>{faltaData.percentPoint}%</span>
  630. </div>
  631. <div className="pb-[.2rem]">FALTA APOSTAR R$ {faltaData.waitPoint}</div>
  632. <div className={"mt-[0.0694rem] flex justify-center"}>
  633. <Button
  634. color={"primary"}
  635. className={"ml-[30px] flex-1 rounded-[.2rem_!important]"}
  636. style={{
  637. "--background-color": "#11de68",
  638. "--border-color": "#11de68",
  639. "--text-color": "#12171a",
  640. }}
  641. onClick={goGame}
  642. >
  643. Para jogos
  644. </Button>
  645. </div>
  646. </TipsModal>
  647. <TipsModal
  648. title={
  649. <div className="text-left">
  650. <div className="text-[.16rem] text-[#11de68]">Saque bem-sucedida.</div>
  651. <div className="text-[.14rem] text-[#fff]">
  652. Seu bônus será liberado. Tem certeza?
  653. </div>
  654. </div>
  655. }
  656. visible={true}
  657. ref={successModelRef}
  658. getContainer={document.querySelector("#app")}
  659. className={styles.gameModal}
  660. >
  661. <div className="pt-[.2rem]">
  662. <span>Bônus</span>
  663. <i className="mx-[.1rem]">R$</i>
  664. <span>{faltaData.point}</span>
  665. </div>
  666. <div className={"flex items-center"}>
  667. <ProgressBar
  668. percent={faltaData.percentPoint}
  669. className={"mr-[0.0694rem] flex-1"}
  670. style={{
  671. "--fill-color": "#11de68",
  672. "--track-color": "#8f9498",
  673. "--track-width": "0.0694rem",
  674. }}
  675. />
  676. <span>{faltaData.percentPoint}%</span>
  677. </div>
  678. <div className="pb-[.2rem]">FALTA APOSTAR R$ {faltaData.waitPoint}</div>
  679. <div className={"mt-[0.0694rem] flex justify-center"}>
  680. <Button
  681. color={"primary"}
  682. className={"ml-[30px] flex-1 rounded-[.2rem_!important]"}
  683. style={{
  684. "--background-color": "#ebc71f",
  685. "--border-color": "#ebc71f",
  686. "--text-color": "#12171a",
  687. }}
  688. onClick={() => successModelRef.current?.onClose()}
  689. >
  690. Cancelar
  691. </Button>
  692. <Button
  693. color={"primary"}
  694. className={"ml-[30px] flex-1 rounded-[.2rem_!important]"}
  695. style={{
  696. "--background-color": "#11de68",
  697. "--border-color": "#11de68",
  698. "--text-color": "#12171a",
  699. }}
  700. >
  701. confirmação
  702. </Button>
  703. </div>
  704. </TipsModal> */}
  705. </div>
  706. );
  707. };
  708. export default Withdraw;